<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>数据绑定</title>
    <script type="text/javascript" src="../../../public/vue.js"></script>
</head>
<body>
    <div id="root">
        <h1>数据绑定</h1>
        <h3>你好 ,{{name}}</h3>
        <hr/>
        <a v-bind:href="school.url"> 点击去百度 </a>
        单项数据绑定：<input type="text" v-bind:value="name">
        <!-- v-model 只能作用于表单类 input、单选框、多选框、复选框 -->
        双向数据绑定：<input type="text" v-model:value="name">
        <!-- 简写 -->
        双向数据绑定简写：<input type="text" v-model="name">

    </div>

</body>

<script type="text/javascript">
    new Vue({
        el:'#root',
        data:{
            name: '那都',
            school:{
                url: 'http://www.baidu.com'
            }
        }
    })

</script>
</html>